<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"	
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sysCustGuarantorBean.id}"/>
		<f:event type="preRenderView" listener="#{sysCustGuarantorBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sys Cust Guarantor"/>

	<ui:define name="header">
		Sys Cust Guarantor
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sysCustGuarantorBean.id}">
				Edit existing Sys Cust Guarantor
			</c:when>
			<c:otherwise>
				Create a new Sys Cust Guarantor
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorIdCardNo" value="Id Card No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorIdCardNo" maxLength="20" required="true" value="#{sysCustGuarantorBean.sysCustGuarantor.idCardNo}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorIdCardNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorIdCardIssuedDate" value="Id Card Issued Date:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorIdCardIssuedDate" maxLength="10" value="#{sysCustGuarantorBean.sysCustGuarantor.idCardIssuedDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorIdCardIssuedDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorIdCardExpireDate" value="Id Card Expire Date:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorIdCardExpireDate" maxLength="10" value="#{sysCustGuarantorBean.sysCustGuarantor.idCardExpireDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorIdCardExpireDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorIdCardIssuedAt" value="Id Card Issued At:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorIdCardIssuedAt" maxLength="100" value="#{sysCustGuarantorBean.sysCustGuarantor.idCardIssuedAt}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorIdCardIssuedAt" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorNameTitleNo" value="Name Title No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorNameTitleNo" value="#{sysCustGuarantorBean.sysCustGuarantor.nameTitleNo}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorNameTitleNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorFirstName" value="First Name:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorFirstName" maxLength="50" required="true" value="#{sysCustGuarantorBean.sysCustGuarantor.firstName}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorFirstName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorLastName" value="Last Name:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorLastName" maxLength="50" required="true" value="#{sysCustGuarantorBean.sysCustGuarantor.lastName}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorLastName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorSexNo" value="Sex No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorSexNo" value="#{sysCustGuarantorBean.sysCustGuarantor.sexNo}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorSexNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorAddr1" value="Addr 1:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorAddr1" maxLength="100" value="#{sysCustGuarantorBean.sysCustGuarantor.addr1}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorAddr1" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorAddr2" value="Addr 2:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorAddr2" maxLength="50" value="#{sysCustGuarantorBean.sysCustGuarantor.addr2}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorAddr2" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorAddr3" value="Addr 3:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorAddr3" maxLength="50" value="#{sysCustGuarantorBean.sysCustGuarantor.addr3}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorAddr3" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorAddr4No" value="Addr 4No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorAddr4No" value="#{sysCustGuarantorBean.sysCustGuarantor.addr4No}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorAddr4No" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorAddr5" value="Addr 5:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorAddr5" maxLength="50" value="#{sysCustGuarantorBean.sysCustGuarantor.addr5}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorAddr5" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorPhoneNo" value="Phone No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorPhoneNo" maxLength="20" value="#{sysCustGuarantorBean.sysCustGuarantor.phoneNo}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorPhoneNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorMobileNo" value="Mobile No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorMobileNo" maxLength="20" value="#{sysCustGuarantorBean.sysCustGuarantor.mobileNo}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorMobileNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr1" value="Office Addr 1:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorOfficeAddr1" maxLength="100" value="#{sysCustGuarantorBean.sysCustGuarantor.officeAddr1}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr1" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr2" value="Office Addr 2:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorOfficeAddr2" maxLength="50" value="#{sysCustGuarantorBean.sysCustGuarantor.officeAddr2}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr2" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr3" value="Office Addr 3:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorOfficeAddr3" maxLength="50" value="#{sysCustGuarantorBean.sysCustGuarantor.officeAddr3}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr3" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr4No" value="Office Addr 4No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorOfficeAddr4No" value="#{sysCustGuarantorBean.sysCustGuarantor.officeAddr4No}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr4No" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr5" value="Office Addr 5:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorOfficeAddr5" maxLength="10" value="#{sysCustGuarantorBean.sysCustGuarantor.officeAddr5}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorOfficeAddr5" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustGuarantorBeanSysCustGuarantorOfficePhoneNo" value="Office Phone No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustGuarantorBeanSysCustGuarantorOfficePhoneNo" maxLength="20" value="#{sysCustGuarantorBean.sysCustGuarantor.officePhoneNo}"/>
					<h:message for="sysCustGuarantorBeanSysCustGuarantorOfficePhoneNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sysCustGuarantorBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sysCustGuarantorBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sysCustGuarantorBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sysCustGuarantorBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>